package com.mb.mp.constants;

/**
 * Admin 常量
 *
 * @author michael.li
 * @create 2018-03-24 下午3:24
 **/
public class AdminConstants {

    public enum Base {
        SUCCESS(0, "成功"),
        FAILED(1, "失败"),
        PARAM_EMPTY(20000, "缺少必传参数"),
        DATA_NOT_EXIST(91000, "数据不存在");

        Base(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private int code;
        private String msg;


        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 订单结算类型
     */
    public enum SettleType {
        REPAIR_FEE(1, "维修费"),
        BALANCE(2, "尾款");

        private int code;
        private String msg;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        SettleType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }

    /**
     * 结算状态
     */
    public enum SettleStatus {
        SETTLED(1, "已结算"),
        UNSETTLED(0, "未结算");

        SettleStatus(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private int code;
        private String msg;


        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
    /**
     * 短信类型
     */
    public enum SmsType {
        verifiyCode(1, "验证码"),
        auth(2, "认证");

        private int code;
        private String msg;

        private SmsType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 服务类型
     */
    public enum RepairType {
        INSTALL(1, "安装单"),
        REPAIR(2, "维修单"),
        CLEAN(3, "清洗单");

        private int code;
        private String msg;

        RepairType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    public enum UserIdentity {
        STAND_AUTH(0, "待认证"),
        SALE_BOSS(1, "销售店面老板"),
        SALE_STAFF(2, "销售店面员工"),
        REPAIR_BOSS(3, "维修店面老板"),
        REPAIR_STAFF(4, "维修店面员工"),
        EXPERT(5, "专家"),
        USER(6, "用户");

        private int code;
        private String msg;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        UserIdentity(int code, String msg) {

            this.code = code;
            this.msg = msg;
        }
    }

    /**
     * @description: 订单状态
     * @author: TimothyZz
     * @date: 2018/4/8 14:34
     */
    public enum OrderStatus {
        STANDING(1, "待派单"),
        ASSIGNED(2, "已派单，待接单"),
        RECEIVED(3, "已接单，待上门"),
        FORWARD(4, "已上门"),
        CUSTOMER_RECEIVED(5, "用户确认接单"),
        RETURN(6, "退单"),
        PAY(7, "用户待支付"),
        PAID(8, "用户已支付"),
        FINISH(9, "订单完成"),
        PAY_SALE(10, "下单方待支付"),
        PAID_SALE(11, "下单方已支付"),
        SUSPENDED(12, "挂单"),
        CLOSE(13,"人工关闭"),
       SUCCESS(14,"下单成功");
        private int code;
        private String msg;

        OrderStatus(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 推送类型
     */
    public enum PushType {
        notify(1, "通知"),
        message(2, "透传");

        private int code;
        private String msg;

        PushType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 推送消息类型
     */
    public enum PushMsgType {
        order(1, "订单消息"),
        other(2, "其他消息");

        private int code;
        private String msg;

        private PushMsgType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }


    /**
     * 辅材、配件
     */
    public enum ProdUxiliary {
        prod(1, "辅材"),
        parts(2, "配件");

        private int code;
        private String msg;

        ProdUxiliary(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
    /**
     * 安装、维修
     */
    public enum UxiliaryType {
        prod("1", "安装"),
        parts("2","维修");

        private String code;
        private String msg;

        UxiliaryType(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * redis消息对列
     */
    public enum RedisTopic {
        WX_MSG("topic-mp-001", "微信消息"),
        PUSH_MSG("topic-mp-002", "推送消息"),
        ORDER_SETTLE_MSG("topic-mp-003", "订单结算");

        RedisTopic(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        private String code;
        private String msg;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * @Description: 订单相关推送
     * @Param:
     * @return:
     * @Author: TimothyZz
     * @Date: 2018/4/23 10:52
     */
    public enum PushForOrder {
        STAND_ASSIGN("销售方下单成功", "维修老板", "待派单订单", "您有一条待派单信息，请登录APP处理！"),
        STAND_RECEIVE("维修老板派单成功", "维修工人", "待接单订单", "您有一条待接单信息，请登录APP处理！"),
        RECEIVE_SUCCESS("维修工人接单成功", "维修老板", "接单信息", "您的订单已有维修师傅接单！"),
        UP_TO_DOOR("维修工人已上门", "维修老板，如是销售方下单，同时推送给销售老板", "维修师傅已上门", "您的订单已有维修师傅上门！"),
        STAND_PAY("用户支付完成，待下单方支付", "销售老板", "待支付信息", "您有一个待支付订单，请登录APP处理！"),
        FINISH_ORDER("订单完成", "维修老板、下单方", "订单完成", "您的订单已完成！"),
        RECEIVE_REJECT("维修工人拒接单", "维修老板", "拒单信息", "您分派的订单已被维修师傅拒单，请登录APP重新派单！"),
        CUSTOMER_REJECT("用户退单", "维修老板、下单方", "退单信息", "您的订单已被用户退单，请登录APP查看！"),
        CUSTOMER_CONFIRM("用户接单", "维修老板", "客户接单信息", "您的订单用户已接单，请登录APP查看！"),
        HANG_ORDER("需挂单情况", "销售老板、维修老板", "挂单信息", "您有一笔订单已挂起，请登陆APP查看"),
        UN_HANG_ORDER("解挂情况", "销售老板、维修老板", "解挂信息", "您有一笔挂起订单已恢复正常，请登陆APP查看"),
        NOT_SEND_ORDER("销售方下单成功","维修老板","待派单订单","条待派单信息，请登录APP处理！"),
        NOT_GET_ORDER("维修老板下单成功","维修老板","待接单订单","条待接单信息，请登录APP处理！");

        private String scene;
        private String receiver;
        private String title;
        private String content;

        PushForOrder(String scene, String receiver, String title, String content) {
            this.scene = scene;
            this.receiver = receiver;
            this.title = title;
            this.content = content;
        }

        public String getScene() {
            return scene;
        }

        public void setScene(String scene) {
            this.scene = scene;
        }

        public String getReceiver() {
            return receiver;
        }

        public void setReceiver(String receiver) {
            this.receiver = receiver;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }
    }

    /**
     * 支付交易状态
     */
    public enum TradeState {
        unPay(0, "未支付"),
        succ(1, "支付成功"),
        refund(2, "退款"),
        closed(3, "交易关闭"),
        userPaying(4, "用户支付中"),
        payError(5, "支付失败"),
        tradeFinished(6, "交易结束，不可退款");

        private int code;
        private String msg;

        TradeState(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 订单类型
     */
    public enum OrderType {
        ORDER400(1, "400订单"),
        WECHAT(2, "微信订单"),
        REPAIR(3, "维修店订单"),
        SALE(4, "销售店订单"),
        PROXY(5, "代理商订单"),
        MANUFACTURERS(6, "厂家订单");

        private int code;
        private String msg;

        OrderType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * @description: 数据字典类别
     * @author: TimothyZz
     * @date: 2018/6/13 10:05
     */
    public enum DictType {
        /**
         * 商品类别/辅材类别
         */
        UXILIARY_CLASS("uxiliary_class", "商品类别/辅材类别");

        private String code;
        private String msg;

        DictType(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    /**
     * 新闻审核状态
     */
    public enum NewsStatus{
        WAIT(0, "待审核"),
        PASS(1, "审核通过"),
        REJECT(2, "审核不通过");
        private int code;
        private String msg;

        NewsStatus(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
}
